package ATM;

import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class LogJpanel extends JPanel implements ActionListener {
    private ATMJframe atmJframe;
    private JButton btnLog;
    private Icon background = Util.getimagesIcon("/images/buttonLand.jpg");

    public LogJpanel(ATMJframe atmJframe) {
        this.atmJframe = atmJframe;
        this.setLayout(null);
        this.setOpaque(false);
        btnLog = new JButton("", background);
        btnLog.setBounds(300, 400, 140, 50);
        this.add(btnLog);


        btnLog.addActionListener(this);
    }

    @Override
    public void actionPerformed(ActionEvent e) {
        if (e.getSource() == btnLog) {
            atmJframe.switchPanel("menu");
        }
    }
}
